package com.yuandian.api.business_monitor.feign;

import com.yuandian.api.business_monitor.po.DetailedListParams;
import com.yuandian.api.business_monitor.po.QueryBusinessDetailParams;
import com.yuandian.api.business_monitor.po.QueryBusinessStepParams;
import com.yuandian.api.business_monitor.po.QueryEndToEndDetailParams;
import com.yuandian.api.business_monitor.vo.BusinessDetailVo;
import com.yuandian.api.business_monitor.vo.EndToEndRelationVo;
import com.yuandian.api.business_monitor.vo.EndToEndShowVo;
import com.yuandian.bpm.common.core.util.R;
import com.yuandian.utils.PageDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 说明：业务详单查询接口，提供给运维工作台远程调用
 * @author LinShiHe
 * @Date 2023/3/14 16:06
 */
@FeignClient(contextId = "RemoteBusinessDetailService", value = "bpm-business-monitor")
public interface RemoteBusinessDetailService {


	/**
	 * 详单查询列表查询
	 *
	 * @param params 参数
	 * @return Result	通用结果集
	 */
	@PostMapping("/business/monitoring/detail/getList")
	R<PageDataInfo> getList(@RequestBody DetailedListParams params);


	/**
	 * 详单查询下载
	 *
	 * @param params 参数
	 * @return Result	通用结果集
	 */
	@PostMapping("/business/monitoring/detail/download")
	R<Object> download(@RequestBody DetailedListParams params);


	/**
	 * 根据详单id查询业务详情
	 * @param params 业务详情查询参数
	 * @return 通用返回对象
	 */
	@PostMapping("/business/detail/queryBusinessDetailByDetailId")
	R<BusinessDetailVo> queryBusinessDetailByDetailId(@RequestBody QueryBusinessDetailParams params);


	/**
	 * 分页查询业务步骤列表
	 * @param params 查询业务步骤参数
	 * @return 通用返回对象
	 */
	@PostMapping("/business/detail/queryBusinessStepListPage")
	R<PageDataInfo> queryBusinessStepListPage(@RequestBody QueryBusinessStepParams params);


	/**
	 * 步骤端到端实时关联
	 * @param endToEndRelationVo 端到端关联vo对象
	 * @return 通用返回对象
	 */
	@PostMapping("/business/detail/stepEndToEndRelation")
	R<List<EndToEndShowVo>> endToEndRelation(@RequestBody EndToEndRelationVo endToEndRelationVo);


	/**
	 * 查询端到端节点详情
	 * @param params 查询端到端节点详情数据参数
	 * @return 通用返回对象
	 */
	@PostMapping("/business/detail/queryEndToEndDetail")
	R<PageDataInfo> queryEndToEndDetail(@RequestBody QueryEndToEndDetailParams params);
}